# 获取包含令牌的请求头，如果不传参数，默认是管理员账号，如果传参，令牌是当前用户的账号
from api.login_api import LoginApi


def get_headers(mobile="13800000002", password="123456"):
    body = {"mobile": mobile, "password": password}
    resp = LoginApi.login(body)
    token = "Bearer " + resp.json().get("data")
    headers = {"Authorization": token}
    return headers